#define _CRT_SECURE_NO_WARNINGS 1

#include <iostream>

using namespace std;

int g_int = 10;

void test1()
{
	int a = 10;
	int b = 20;
	//[&a, &b](int x, int y) { x = 10; y = 20; };
	auto la = [&a, &b] { a = 20; b = 10; }; la();
	static int st_int = 20;
	const int con_int = 20;
	//[&con_int]() { }();
	//cout << typeid(la).name() << endl;
	cout << [](int a, int b) {return a + b; }(10, 20) << endl;
	//cout << a << " " << b << endl;
}

struct sumFunc
{
	int operator()(int a, int b)
	{
		return a + b;
	}
};

void test2()
{
	auto sum = [](int a, int b) { return a + b; };
	sum(10, 20);
	sumFunc()(10, 20);
}

int main()
{
	//test1();
	test2();
	return 0;
}